import vue from '@vitejs/plugin-vue'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
import createAutoImport from './auto-import'
import createUseComponents from './auto-use-components'
import createVisualizerConfig from './rollup-visualizer'
import createUnocss from './unocss'

// 默认的一些设置
export default function createVitePlugins(isBuild: boolean) {
  const vitePlugins = [
    vue(),
    VueSetupExtend(),
    createAutoImport(),
    createUseComponents(),
    createVisualizerConfig(isBuild),
    createUnocss(),
  ]
  return vitePlugins
}
